/** 
* @param {array}
* @param {any}
* @returns {array}
**/
function concat(array, ...args) {
  if (!Array.isArray(array)) return
  const res = [...array]
  const len = args.length
  let i = -1

  while( ++i < len) {
    if (Array.isArray(args[i])) {
      res.push(...args[i])
    } else {
      res.push(args[i])
    }
  }
  return res
}

export default concat